package eerbaar.v2.app.view2;

import java.awt.AlphaComposite;
import java.awt.Composite;
import java.awt.Graphics2D;
import java.awt.Rectangle;

import eerbaar.v2.app.view.Standard;

public class PackMemberDecorator implements IPackMemberDecorator {

    public PackMemberDecorator() {
        //
    }

    @Override
    public void drawImage(Rectangle r, Graphics2D g) {

        // Graphics2D graphics = (Graphics2D) canvas.getBufferStrategy()
        // .getDrawGraphics();

        Composite save = g.getComposite();

        int type = AlphaComposite.SRC_OVER;
        AlphaComposite alpha = AlphaComposite.getInstance(type, 0.6f);
        g.setComposite(alpha);

        g.setColor(Standard.YELLOW);
        g.drawRoundRect(r.x + 2, r.y + 2, 46, 46, 10, 10);

        g.setComposite(save);
    }

}
